package com.kateba.android.blueinput;

import android.content.Context;
import android.graphics.Typeface;
import android.os.Build;
import android.util.AttributeSet;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TableLayout;
import android.widget.TextView;

import com.teksoftco.android.utils.DevUniqueID;

public class GUITab5 extends RelativeLayout
{
  public ImageButton[] m_IB = new ImageButton[5];
  private int[] m_nIBImgs;
  public WebView m_webMoreApps;
  public LinearLayout panelVScroll;

  public GUITab5(Context paramContext)
  {
    super(paramContext);
    int[] arrayOfInt = new int[5];
    arrayOfInt[0] = 2130837512;
    arrayOfInt[1] = 2130837517;
    arrayOfInt[2] = 2130837510;
    arrayOfInt[3] = 2130837516;
    arrayOfInt[4] = 2130837511;
    this.m_nIBImgs = arrayOfInt;
    int i = Singleton.getInstance().applySCRDensity(paramContext, Singleton.g_nSpacing);
    int j = Singleton.getInstance().applySCRDensity(paramContext, Singleton.g_nButPadding);
    setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
    setPadding(i, i, i, i);
    setBackgroundColor(Singleton.clrBackgroundApp);
    LinearLayout localLinearLayout1 = new LinearLayout(paramContext);
    localLinearLayout1.setId(34120);
    localLinearLayout1.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
    localLinearLayout1.setOrientation(0);
    localLinearLayout1.setPadding(0, i, 0, 0);
    LinearLayout localLinearLayout2 = new LinearLayout(paramContext);
    localLinearLayout2.setBackgroundDrawable(getResources().getDrawable(2130837518));
    localLinearLayout2.setOrientation(0);
    localLinearLayout2.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
    localLinearLayout2.setPadding(i, i, i, i);
    int k = 0;
    LinearLayout localLinearLayout5 = null;
    if (k >= this.m_IB.length)
    {
      localLinearLayout1.addView(localLinearLayout2);
      RelativeLayout.LayoutParams localLayoutParams2 = new RelativeLayout.LayoutParams(-1, -2);
      localLayoutParams2.addRule(12);
      localLayoutParams2.addRule(14);
      addView(localLinearLayout1, localLayoutParams2);
      LinearLayout localLinearLayout3 = new LinearLayout(paramContext);
      localLinearLayout3.setBackgroundDrawable(getResources().getDrawable(2130837518));
      localLinearLayout3.setOrientation(1);
      localLinearLayout3.setPadding(i, i, i, i);
      RelativeLayout.LayoutParams localLayoutParams3 = new RelativeLayout.LayoutParams(-1, -1);
      localLayoutParams3.addRule(10);
      localLayoutParams3.addRule(14);
      localLayoutParams3.addRule(2, 34120);
      addView(localLinearLayout3, localLayoutParams3);
      ScrollView localScrollView = new ScrollView(paramContext);
      localScrollView.setFillViewport(false);
      localLinearLayout3.addView(localScrollView);
      LinearLayout localLinearLayout4 = new LinearLayout(paramContext);
      this.panelVScroll = localLinearLayout4;
      this.panelVScroll.setOrientation(1);
      localScrollView.addView(this.panelVScroll);
      TextView localTextView1 = new TextView(paramContext);
      localTextView1.setText("BlueInput 2.0.209.HIDP1.0.100");
      localTextView1.setTypeface(Typeface.DEFAULT, 1);
      localTextView1.setTextSize(2, Singleton.g_nTitleSize);
      localTextView1.setTextColor(Singleton.clrText);
      localTextView1.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
      this.panelVScroll.addView(localTextView1);
      TextView localTextView2 = new TextView(paramContext);
      localTextView2.setTextColor(Singleton.clrSubText);
      localTextView2.setText("OS:" + Build.VERSION.RELEASE + " SDK:" + Build.VERSION.SDK + " " + Build.MODEL + "\n");
      localTextView2.setTextSize(2, Singleton.g_nSubtitleSize);
      localTextView2.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
      this.panelVScroll.addView(localTextView2);
      localLinearLayout5 = new LinearLayout(paramContext);
      localLinearLayout5.setLayoutParams(new LinearLayout.LayoutParams(-1, -2));
      localLinearLayout5.setOrientation(1);
      localLinearLayout5.setBackgroundDrawable(getResources().getDrawable(2130837520));
      this.panelVScroll.addView(localLinearLayout5);
      if (!Singleton.getInstance().m_regObj.IsRegistered())
       // break label990;
      Singleton.getInstance().m_sett.setRegStatus(true);
      TextView localTextView6 = new TextView(paramContext);
      localTextView6.setTextColor(Singleton.clrSubText);
      localTextView6.setText(getResources().getString(2131034148));
      localTextView6.setTextSize(2, Singleton.g_nSubtitleSize);
      localTextView6.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
      localLinearLayout5.addView(localTextView6);
    }
    while (true)
    {
      TextView localTextView5 = new TextView(paramContext);
      localTextView5.setText("\n" + getResources().getString(2131034177));
      localTextView5.setTextColor(Singleton.clrText);
      localTextView5.setTypeface(Typeface.DEFAULT, 1);
      localTextView5.setTextSize(2, Singleton.g_nTitleSize);
      localTextView5.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
      this.panelVScroll.addView(localTextView5);
     // return;
      ImageButton[] arrayOfImageButton = this.m_IB;
      ImageButton localImageButton = new ImageButton(paramContext);
      arrayOfImageButton[k] = localImageButton;
      this.m_IB[k].setBackgroundDrawable(getResources().getDrawable(2130837519));
      this.m_IB[k].setPadding(j, j, j, j);
      this.m_IB[k].setImageDrawable(getResources().getDrawable(this.m_nIBImgs[k]));
      this.m_IB[k].setLayoutParams(new RelativeLayout.LayoutParams(-2, -2));
      this.m_IB[k].setOnClickListener((View.OnClickListener)paramContext);
      RelativeLayout localRelativeLayout = new RelativeLayout(paramContext);
      RelativeLayout.LayoutParams localLayoutParams1 = new RelativeLayout.LayoutParams(-2, -2);
      localLayoutParams1.addRule(13);
      localRelativeLayout.addView(this.m_IB[k], localLayoutParams1);
      localLinearLayout2.addView(localRelativeLayout, new TableLayout.LayoutParams(-1, -1, 1.0F));
      k++;
    //  break;
      label990: Singleton.getInstance().m_sett.setRegStatus(false);
      TextView localTextView3 = new TextView(paramContext);
      localTextView3.setId(508);
      localTextView3.setText(getResources().getString(2131034149));
      localTextView3.setTextSize(2, Singleton.g_nSubtitleSize);
      localTextView3.setTextColor(-65536);
      localTextView3.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
      localLinearLayout5.addView(localTextView3);
      TextView localTextView4 = new TextView(paramContext);
      localTextView4.setTextColor(Singleton.clrSubText);
      localTextView4.setTypeface(Typeface.DEFAULT, 1);
      localTextView4.setText(getResources().getString(2131034150) + ": " + DevUniqueID.GetID());
      localTextView4.setTextSize(2, Singleton.g_nSubtitleSize);
      localTextView4.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
      localLinearLayout5.addView(localTextView4);
      EditText localEditText = new EditText(paramContext);
      localEditText.setTextColor(Singleton.clrSubText);
      localEditText.setTextSize(2, Singleton.g_nSubtitleSize);
      localEditText.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
      localEditText.setId(507);
      localEditText.setHint(2131034151);
      localLinearLayout5.addView(localEditText);
      Button localButton = new Button(paramContext);
      localButton.setLayoutParams(new RelativeLayout.LayoutParams(-2, -2));
      localButton.setOnClickListener((View.OnClickListener)paramContext);
      localButton.setId(509);
      localButton.setText(getResources().getString(2131034152));
      localButton.setTextSize(2, Singleton.g_nSubtitleSize);
      localLinearLayout5.addView(localButton);
    }
  }

  public GUITab5(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
    int[] arrayOfInt = new int[5];
    arrayOfInt[0] = 2130837512;
    arrayOfInt[1] = 2130837517;
    arrayOfInt[2] = 2130837510;
    arrayOfInt[3] = 2130837516;
    arrayOfInt[4] = 2130837511;
    this.m_nIBImgs = arrayOfInt;
  }
}